﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoCache.Server.Model;
using DbMapping.Common;
using VideoCache.Server.DAL;

namespace VideoCache.Server.BLL
{
    public partial class AgentBLL
    {
        public static AgentInfo GetAgentByUserId(int userId)
        {
            Conditions cons = new Conditions();

            cons.Add(new ConditionItem(LinkType.And, AgentInfo.UserIdField, CompareType.Equal, userId));

            return AgentDAL.Find(cons, null);
        }
    }
}
